<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
</head>

<body>
	<!-- 为 ECharts 准备一个具备大小（宽高）的 DOM -->
	<div id="main" style="width: 600px; height: 400px;"></div>


	<%
		var xData = "[";
		var yData = "[";	
		
		for(var item in countData!) {
			xData = xData  +"'"+ item._dateOfContract +"',";
			yData = yData + item.numCount +",";
		}
		
		var xIndex = strutil.lastIndex(xData,",");
		var yIndex = strutil.lastIndex(yData,",");
		xData = strutil.subStringTo(xData,0,xIndex);
		yData = strutil.subStringTo(yData,0,yIndex);
		xData = xData +"]";
		yData = yData +"]";
	%>
	<!-- 引入 ECharts 文件 -->
	<script src="${ctxPath}/assets/echarts/echarts.min.js"></script>

	
	<script type="text/javascript">
	

	 // 基于准备好的dom，初始化echarts实例
    var myChart = echarts.init(document.getElementById('main'));

    // 指定图表的配置项和数据
    var option = {
        title: {
            text: '合同统计'
        },
        tooltip: {
        	
        },
         legend: {
            data:['本周']
        }, 
        xAxis: {
            data: ${xData}
        },
        yAxis: {},
        series: [{
            name: '合同数',
            type: 'bar',
            data:${yData}
        }]
    };
    // 使用刚指定的配置项和数据显示图表。
    myChart.setOption(option);
	
	</script>
</body>
</html>